﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SHCP
{
    public class WinHelper
    {
        /// <summary>
        /// 模拟鼠标点击
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public static void Click(int x, int y)
        {
            System.Windows.Forms.Cursor.Position = new System.Drawing.Point(x, y);
            Win32API.mouse_event(Win32API.MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
            Win32API.mouse_event(Win32API.MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        }
    }
}
